﻿<Window x:Class="SampleProject.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:SampleProject"
        xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
        xmlns:tab="http://fabtab.codeplex.com"
    Title="Window1" Height="600" Width="800">
    <Window.Resources>
        
        <Style TargetType="{x:Type tab:FabTabItem}">
            <Setter Property="Header" Value="{Binding Path=LabelText,diagnostics:PresentationTraceSources.TraceLevel=High}"/>
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" Margin="0,0,4,0">
                            <TextBlock Text="{Binding}" TextTrimming="CharacterEllipsis"/>
                            
                        </StackPanel>

                    </DataTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Trigger.EnterActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <tab:EasingMarginAnimation Duration="0:0:0.7" From="500,0,0,0" To="0,0,0,0"
                                                         Storyboard.TargetProperty="Content.Margin"
                                                           Equation="BounceEaseIn"
                                                                     />
                               
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.EnterActions>
                </Trigger>
            </Style.Triggers>

        </Style>
                    
    </Window.Resources>
    <DockPanel>
        <Button DockPanel.Dock="Right" Click="Button_Click" Content="Add Tab"/>
        <tab:FabTabControl x:Name="tabControl" ItemsSource="{Binding}" ShowDefaultTransitionAnimation="False"
                                  DockPanel.Dock="Left" />      
       
    </DockPanel>
</Window>
